package com.ajavaer.framework.im.tencent.request.data;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * 添加群组成员
 */
public class AddGroupMemberData implements TencentImRequestData {
    /**
     * 要操作的群组（必填）
     */
    @JsonProperty("GroupId")
    private String groupId;
    /**
     * 要添加的群成员ID（必填）,只填充Member_Account即可
     */
    @JsonProperty("MemberList")
    private List<Member> memberList = new ArrayList<>();
    /**
     * 是否静默加人（选填）0：非静默加人；1：静默加人。不填该字段默认为0
     */
    @JsonProperty("Silence")
    private Integer silence;

    public AddGroupMemberData() {
    }

    public AddGroupMemberData(String groupId, String... member) {
        this.groupId = groupId;
        if (member != null) {
            for (String item : member) {
                this.memberList.add(new Member(item));
            }
        }
    }

    public Integer getSilence() {
        return silence;
    }

    public void setSilence(Integer silence) {
        this.silence = silence;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public List<Member> getMemberList() {
        return memberList;
    }

    public void setMemberList(List<Member> memberList) {
        this.memberList = memberList;
    }
}
